package com.jiao.testdemo.pattern.proxy;

/**
 * TODO(文件概要)
 *
 * <p> TODO(具体描述信息,可以不填)
 *
 * @author meetsocial
 * @version V1.0
 * @className: Proxy
 * @date 2024/11/15 10:24
 */
public class Proxy implements Subject{
    private RealSubject realSubject;

    @Override
    public void request() {
        if (realSubject == null) {
            realSubject = new RealSubject();
        }
        realSubject.request();  // 代理控制对真实主题的访问
    }
}
